import React from 'react'
import { Redirect } from 'umi';
export default function index(props: any) {
    const isLogin = window.localStorage.getItem("isLogin")
    console.log(isLogin, "1")
    if (isLogin) {
        return <div>{props.children}</div>;
    } else {
        return <Redirect to="/login" />;
    }
}
